import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import store from './store/store.js'
import './assets/css/global.css'
import './assets/ali-icon/iconfont.css'
/* 导入富文本编辑器 */
import VueQuillEditor from 'vue-quill-editor'
import ElementUI from 'element-ui'

import HtmlPanel from './components/mountHtml/HtmlPanel.vue'


/* 导入富文本编辑器对应的样式 */
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme
import Bus from "./store/bus";

import echarts from 'echarts'
Vue.prototype.$echarts = echarts

import moment from 'moment'
Vue.filter('dateYMDHMSFormat',function(dateStr,pattern='YYYY-MM-DD HH:mm:ss'){
  return moment(dateStr).format(pattern);
})

/* 导入axios包 */
import axios from 'axios'
/* 设定axios的请求根目录 */
// axios.defaults.baseURL = 'http://localhost:8091/'
axios.defaults.baseURL = 'http://localhost:8099/'
/* 向vue对象中添加全局对象 以后发送ajax请求使用$http对象 */
Vue.prototype.$http = axios
Vue.prototype.$bus = Bus

Vue.config.productionTip = false

/* 定义过滤器 */
// Vue.filter('priceFormat', function (price) {
//   return (price / 100).toFixed(2)
// })

/* 将富文本编辑器注册为全局可用的组件 */
Vue.use(VueQuillEditor);
Vue.use(ElementUI);
Vue.use(store);

Vue.component('v-html-panel',HtmlPanel)

new Vue({
  router,
  store,
  data: function(){
          return {
              URL: '',
          }
      },
  render: h => h(App)
}).$mount('#app')
